﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Rhsoft.SqlServer.MetadataManager
{
    public partial class LinqGen : Form
    {
        #region Properties
        public bool PreventDebugger { get; set; }
        public bool IsSealed { get; set; }
        public bool IsSerializable { get; set; }
        public string DataContextName { get; set; }
        public string DataContextNamespace { get; set; }
        public string EntityNamespace { get; set; }
        public string SavePath { get; set; }
        public bool MultipleClasses { get; set; }
        public bool SelectedTables { get; set; }
        #endregion

        #region Constructors
        public LinqGen( )
        {
            InitializeComponent( );
            //Initialize.
            PreventDebugger = false;
            IsSealed = true;
            IsSerializable = true;
            DataContextName = string.Empty;
            DataContextNamespace = string.Empty;
            EntityNamespace = string.Empty;
            MultipleClasses = false;
            SelectedTables = true;
            SavePath = AppDomain.CurrentDomain.BaseDirectory;

            InitializeFields( );
        }
        #endregion

        #region User Interface
        void InitializeFields( )
        {
            fIsSealed.Checked = true;
            fIsSerializable.Checked = true;
            fMultiple.Checked = false;
            fPreventDebug.Checked = false;
            fSelectedTables.Checked = true;
        }
        #endregion

        #region Methods
        
        #endregion

        #region Events
        private void fPreventDebug_CheckedChanged( object sender, EventArgs e )
        {

        }
        private void bBrowse_Click( object sender, EventArgs e )
        {

            FolderBrowserDialog SvDialog = new FolderBrowserDialog( );
            if(SvDialog.ShowDialog() == DialogResult.OK)
            {
                fSavePath.Text = SvDialog.SelectedPath;
            }
            
        }
        private void bCancel_Click( object sender, EventArgs e )
        {
            this.Hide( );
            this.Dispose( );
        }
        private void bOk_Click( object sender, EventArgs e )
        {
            this.Hide( );
            this.Dispose( );
        }
        #endregion

        

        

        
    }
}
